<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
<script type="text/javascript">
	var arr = [1,31,4,5,3,1,100,888];
	
	console.log(arr.sort((a,b)=>{return a>b}));
	
	/*for(var i=0;i<arr.length;i++){
		for(var j=i+1;j<arr.length;j++){
			if(arr[i]<arr[j]){
				var temp = arr[j];
				arr[j] = arr[i];
				arr[i] = temp
			}
		}
	}*/


	// console.log(arr);
</script>
</body>
</html>